<h1>Ajouter une photo</h1>

<% form_for(@picture) do |f| %>
  <%= f.error_messages %>
<% end %>

<% if flash[:error] %>
<%=flash[:error]%>
<%end%>

<%= form_tag ({:action => "create"}, :multipart => true) %>
<table>
	<tr>
		<td><label for="pictures_name">Titre : </label></td>
		<td><%= text_field("pictures", "name") %></td>
	</tr>
	<tr>
		<td><label for="pictures_description">Description : </label></td>
		<td><%= text_field("pictures", "description") %></td>
	</tr>
	<tr>
		<td><label for="upload_file">Image : </label></td>
		<td><%= file_field 'upload', 'datafile' %></td>
	</tr>
</table>
<p><%= submit_tag ("Ajouter") %></p>

<%= link_to 'Annuler', pictures_path %>